-- GENERATED SPELL FOR [Bonechewer Blood Prophet] --


function spell0_23237(pUnit, Event) --@Blood Drain,n/a--
pUnit:FullCastSpellOnTarget(41238,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23237', 5000, 1)
end

function spell1_23237(pUnit, Event) --@Bloodbolt,n/a--
pUnit:FullCastSpellOnTarget(41229,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23237', 5500, 1)
end

function spell2_23237(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_23237', 636, 1)
end

function spell3_23237(pUnit, Event) --@Prophecy of Blood,n/a--
pUnit:FullCastSpellOnTarget(41230,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23237', 20324, 1)
end

function spell4_23237(pUnit, Event) --@Prophecy of Blood,n/a--
pUnit:FullCastSpellOnTarget(41231,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23237', 30250, 1)
end

function Sorts_23237(pUnit, Event)
local choix_sorts_23237 = math.random(0, 4)
if choix_sorts_23237 == 0 then
pUnit:RegisterEvent('spell0_23237', 1, 1)
end
if choix_sorts_23237 == 1 then
pUnit:RegisterEvent('spell1_23237', 1, 1)
end
if choix_sorts_23237 == 2 then
pUnit:RegisterEvent('spell2_23237', 1, 1)
end
if choix_sorts_23237 == 3 then
pUnit:RegisterEvent('spell3_23237', 1, 1)
end
if choix_sorts_23237 == 4 then
pUnit:RegisterEvent('spell4_23237', 1, 1)
end
end

function mob23237_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23237', math.random(1500, 3000), 1)
end

function mob23237_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23237_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23237_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23237, 1, 'mob23237_Action')
RegisterUnitEvent(23237, 2, 'mob23237_Leave')
RegisterUnitEvent(23237, 3, 'mob23237_Kill')
RegisterUnitEvent(23237, 4, 'mob23237_Die')
